//
//  ReturnBtn.m
//  GoShops
//
//  Created by zcj on 15-12-2.
//  Copyright (c) 2015年 郑朝军. All rights reserved.
//   搞一个自定义 的按钮

#import "ReturnBtn.h"
#import "Grouble.h"

@implementation ReturnBtn

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // 图标居中
        self.imageView.contentMode = UIViewContentModeLeft;
        // 文字居中
        self.titleLabel.textAlignment = NSTextAlignmentLeft;
        // 字体大小
        self.titleLabel.font = [UIFont systemFontOfSize:18];
        // 文字颜色
        [self setTitleColor:ZCJColor(68, 201, 186) forState:UIControlStateNormal];
        [self setTitleColor:ZCJColor(68, 201, 186) forState:UIControlStateSelected];
        
        //self.imageView.image = [UIImage imageNamed:@"icon_feedCell_star_full"];
       // self.titleLabel
        // 设置文字
        [self setTitle:@"去退货" forState:UIControlStateNormal];
        
        [self setTitle:@"去退货" forState:UIControlStateSelected];
        // 设置图片
        [self setImage:[UIImage imageNamed:@"icon_orderReview_rating_big_star_picked"] forState:UIControlStateNormal];
        [self setImage:[UIImage imageNamed:@"icon_orderReview_rating_big_star_not_picked_select"] forState:UIControlStateSelected];
        
       
    
        // Initialization code
    }
    return self;
}
- (void)setHighlighted:(BOOL)highlighted{}
- (CGRect)imageRectForContentRect:(CGRect)contentRect
{
    CGFloat imageW = 30;
    CGFloat imageH = 30;
    return CGRectMake(0, 0, imageW, imageH);
}
- (CGRect)titleRectForContentRect:(CGRect)contentRect
{
    CGFloat titleW = contentRect.size.width * 0.5;
    CGFloat titleH = contentRect.size.height;
    return CGRectMake(35, 0, titleW, titleH);
}



@end
